package com.example.ch3_2tablayoutviewpager2test;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

public class HomeFragment extends Fragment {

    private TextView tvHome;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        //绑定布局文件
        View homePage = inflater.inflate(R.layout.home_page_activity_main_fragment,null);

        //书写逻辑代码
        //获取布局上的空间对象
        tvHome = homePage.findViewById(R.id.tv_home);

        return homePage;
    }
}















